const pubVmUtil = {
  getVmStateHtml: getVmStateHtml
}

function getVmStateHtml(state) {
  let _html = ''
  // const title = this.$t("vmState[\'" + state + "\']")
  let title = ''
  switch (state) {
    case 'NORMAL':
      _html = `<span class="iconfont icon-playcircle cloud-status-normal" title="${title}"></span>`
      title = '正常'
      break
    case 'ERROR':
      _html = `<span class="iconfont icon-times-circle cloud-status-error" title="${title}"></span>`
      title = '异常'
      break
    default:
      _html = state
      break
  }
  return _html
}

export default pubVmUtil
